#include <stdio.h>
#include <stdlib.h>

int main()
{
    int i,j,k,n,t;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        t=abs((n+1)/2-i);
        for(j=1;j<=t;j++)
        printf(" ");
        k=n-2*t;
        for(j=1;j<=k;j++)
        if(j==1||j==k)
            printf("%d",(n+1)/2-t);
        else printf(" ");
        printf("\n");
    }
    return 0;
}
